home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 February: Tool Chest / Dev.CD Feb 95 / Dev.CD Feb 95.toast / Tool Chest / Interfaces / Universal Interfaces 2.0a3 / Universal AIncludes / ADSP.a next >
Encoding:
Text File  |  1994-11-11  |  6.9 KB  |  164 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        ADSP.a
  3. ;
  4. ;    Copyright:    © 1984-1994 by Apple Computer, Inc.
  5. ;                All rights reserved.
  6. ;
  7. ;    Version:    Universal Interfaces 2.0a3  ETO #16, MPW prerelease.  Friday, November 11, 1994. 
  8. ;
  9. ;    Bugs?:        If you find a problem with this file, send the file and version
  10. ;                information (from above) and the problem description to:
  11. ;
  12. ;                    Internet:    apple.bugs@applelink.apple.com
  13. ;                    AppleLink:    APPLE.BUGS
  14. ;
  15. ;
  16.  
  17.     IF &TYPE('__ADSP__') = 'UNDEFINED' THEN
  18. __ADSP__ SET 1
  19.  
  20.  
  21.     IF &TYPE('__ERRORS__') = 'UNDEFINED' THEN
  22.     include 'Errors.a'
  23.     ENDIF
  24. ;        include 'ConditionalMacros.a'                                ;
  25.  
  26.     IF &TYPE('__APPLETALK__') = 'UNDEFINED' THEN
  27.     include 'AppleTalk.a'
  28.     ENDIF
  29. ;        include 'Types.a'                                            ;
  30. ;        include 'OSUtils.a'                                        ;
  31. ;            include 'MixedMode.a'                                    ;
  32. ;            include 'Memory.a'                                        ;
  33.  
  34. dspInit                            EQU        255                    ; create a new connection end 
  35. dspRemove                        EQU        254                    ; remove a connection end 
  36. dspOpen                            EQU        253                    ; open a connection 
  37. dspClose                        EQU        252                    ; close a connection 
  38. dspCLInit                        EQU        251                    ; create a connection listener 
  39. dspCLRemove                        EQU        250                    ; remove a connection listener 
  40. dspCLListen                        EQU        249                    ; post a listener request 
  41. dspCLDeny                        EQU        248                    ; deny an open connection request 
  42. dspStatus                        EQU        247                    ; get status of connection end 
  43. dspRead                            EQU        246                    ; read data from the connection 
  44. dspWrite                        EQU        245                    ; write data on the connection 
  45. dspAttention                    EQU        244                    ; send an attention message 
  46.  
  47. dspOptions                        EQU        243                    ; set connection end options 
  48. dspReset                        EQU        242                    ; forward reset the connection 
  49. dspNewCID                        EQU        241                    ; generate a cid for a connection end 
  50. ; connection opening modes 
  51. ocRequest                        EQU        1                    ; request a connection with remote 
  52. ocPassive                        EQU        2                    ; wait for a connection request from remote 
  53. ocAccept                        EQU        3                    ; accept request as delivered by listener 
  54. ocEstablish                        EQU        4                    ; consider connection to be open 
  55. ; connection end states 
  56. sListening                        EQU        1                    ; for connection listeners 
  57. sPassive                        EQU        2                    ; waiting for a connection request from remote 
  58. sOpening                        EQU        3                    ; requesting a connection with remote 
  59. sOpen                            EQU        4                    ; connection is open 
  60. sClosing                        EQU        5                    ; connection is being torn down 
  61. sClosed                            EQU        6                    ; connection end state is closed 
  62. ; client event flags 
  63. eClosed                            EQU        $80                    ; received connection closed advice 
  64. eTearDown                        EQU        $40                    ; connection closed due to broken connection 
  65. eAttention                        EQU        $20                    ; received attention message 
  66. eFwdReset                        EQU        $10                    ; received forward reset advice 
  67. ; miscellaneous constants 
  68. attnBufSize                        EQU        570                    ; size of client attention buffer 
  69. minDSPQueueSize                    EQU        100                    ; Minimum size of receive or send Queue 
  70.  
  71. ; connection control block 
  72. TRCCB                     RECORD    0
  73. ccbLink                     ds.l    1                                    ; link to next ccb 
  74. refNum                     ds.w    1                                    ; user reference number 
  75. state                     ds.w    1                                    ; state of the connection end 
  76. userFlags                 ds.b    1                                    ; flags for unsolicited connection events 
  77. localSocket                 ds.b    1                                    ; socket number of this connection end 
  78. remoteAddress             ds        AddrBlock                            ; internet address of remote end 
  79. attnCode                 ds.w    1                                    ; attention code received 
  80. attnSize                 ds.w    1                                    ; size of received attention data 
  81. attnPtr                     ds.l    1                                    ; ptr to received attention data 
  82. reserved                 ds.b    220                                ; for adsp internal use 
  83. sizeof                     EQU    242
  84.                         ENDR
  85.  
  86. DSPParamBlock             RECORD    0
  87. qLink                     ds.l    1
  88. qType                     ds.w    1
  89. ioTrap                     ds.w    1
  90. ioCmdAddr                 ds.l    1
  91. ioCompletion             ds.l    1
  92. ioResult                 ds.w    1
  93. ioNamePtr                 ds.l    1
  94. ioVRefNum                 ds.w    1
  95. ioCRefNum                 ds.w    1                                    ; adsp driver refNum 
  96. csCode                     ds.w    1                                    ; adsp driver control code 
  97. qStatus                     ds.l    1                                    ; adsp internal use 
  98. ccbRefNum                 ds.w    1
  99. VariantLevel0Begin        EQU    *
  100. ccbPtr                     ds.l    1                                    ; pointer to connection control block 
  101. userRoutine                 ds.l    1                                    ; client routine to call on event 
  102. sendQSize                 ds.w    1                                    ; size of send queue (0..64K bytes) 
  103. sendQueue                 ds.l    1                                    ; client passed send queue buffer 
  104. recvQSize                 ds.w    1                                    ; size of receive queue (0..64K bytes) 
  105. recvQueue                 ds.l    1                                    ; client passed receive queue buffer 
  106. attnPtr                     ds.l    1                                    ; client passed receive attention buffer 
  107. localSocket                 ds.b    1                                    ; local socket number 
  108. filler1                     ds.b    1                                    ; filler for proper byte alignment 
  109.                                     ;dspInit, dspCLInit
  110.                         ORG        VariantLevel0Begin
  111. localCID                 ds.w    1                                    ; local connection id 
  112. remoteCID                 ds.w    1                                    ; remote connection id 
  113. remoteAddress             ds        AddrBlock                            ; address of remote end 
  114. filterAddress             ds        AddrBlock                            ; address filter 
  115. sendSeq                     ds.l    1                                    ; local send sequence number 
  116. sendWindow                 ds.w    1                                    ; send window size 
  117. recvSeq                     ds.l    1                                    ; receive sequence number 
  118. attnSendSeq                 ds.l    1                                    ; attention send sequence number 
  119. attnRecvSeq                 ds.l    1                                    ; attention receive sequence number 
  120. ocMode                     ds.b    1                                    ; open connection mode 
  121. ocInterval                 ds.b    1                                    ; open connection request retry interval 
  122. ocMaximum                 ds.b    1                                    ; open connection request retry maximum 
  123. filler2                     ds.b    1                                    ; filler for proper byte alignment 
  124.                                     ;dspOpen, dspCLListen, dspCLDeny
  125.                         ORG        VariantLevel0Begin
  126. abort                     ds.b    1                                    ; abort connection immediately if non-zero 
  127. filler3                     ds.b    1                                    ; filler for proper byte alignment 
  128.                                     ;dspClose, dspRemove
  129.                         ORG        VariantLevel0Begin
  130. reqCount                 ds.w    1                                    ; requested number of bytes 
  131. actCount                 ds.w    1                                    ; actual number of bytes 
  132. dataPtr                     ds.l    1                                    ; pointer to data buffer 
  133. eom                         ds.b    1                                    ; indicates logical end of message 
  134. flush                     ds.b    1                                    ; send data now 
  135.                                     ;dspRead, dspWrite
  136.                         ORG        VariantLevel0Begin
  137. attnCode                 ds.w    1                                    ; client attention code 
  138. attnSize                 ds.w    1                                    ; size of attention data 
  139. attnData                 ds.l    1                                    ; pointer to attention data 
  140. attnInterval             ds.b    1                                    ; retransmit timer in 10-tick intervals 
  141. filler4                     ds.b    1                                    ; filler for proper byte alignment 
  142.                                     ;dspAttention
  143.                         ORG        VariantLevel0Begin
  144. statusCCB                 ds.l    1                                    ; pointer to ccb 
  145. sendQPending             ds.w    1                                    ; pending bytes in send queue 
  146. sendQFree                 ds.w    1                                    ; available buffer space in send queue 
  147. recvQPending             ds.w    1                                    ; pending bytes in receive queue 
  148. recvQFree                 ds.w    1                                    ; available buffer space in receive queue 
  149.                                     ;dspStatus
  150.                         ORG        VariantLevel0Begin
  151. sendBlocking             ds.w    1                                    ; quantum for data packets 
  152. sendTimer                 ds.b    1                                    ; send timer in 10-tick intervals 
  153. rtmtTimer                 ds.b    1                                    ; retransmit timer in 10-tick intervals 
  154. badSeqMax                 ds.b    1                                    ; threshold for sending retransmit advice 
  155. useCheckSum                 ds.b    1                                    ; use ddp packet checksum 
  156.                                     ;dspOptions
  157.                         ORG        VariantLevel0Begin
  158. newcid                     ds.w    1                                    ; new connection id returned 
  159.                                     ;dspNewCID
  160. sizeof                     EQU    68
  161.                         ENDR
  162.  
  163.     ENDIF ; __ADSP__
  164.